import { useNavigate } from "react-router";
import st from "./item.module.css";
const MenuItem = ({ children, src }: any) => {
  const navigate = useNavigate();
  return (
    <div
      className={st.item}
      onClick={children == "我的会员" ? () => navigate("/viplist") : () => {}}
    >
      <img src={src} alt="" />
      <span>{children}</span>
    </div>
  );
};
export default MenuItem;
